/*

Ingar Haaland	
Title: Beliefs about Racial Discrimination

HYPOTHESES:

Stated-Hyp1: Respondents who under-estimate (over-estimate) the degree of 
	racial discrimination and are exposed to information about racial 
	discrimination will be more (less) in favor of affirmative action, and more 
	willing to donate to the NGO.
	
	Test-Hyp1: Information will increase support for affirmative action among those who under-estimated
	
	Test-Hyp2: Information will decrease support for affirmative action among those who over-estimated
	
	Test-Hyp3: Information will increase willingness to donate to NGO among those who under-estimated
	
	Test-Hyp4: Information will decrease willingness to donate to NGO among those who over-estimated
		
	
Stated-Hyp2: Racial identity mediates the effect the information has on 
	people’s policy preferences
		/*
		Note: it seems like the researcher meant "moderate" instead of mediate.
		There are no measures in the quex pertaining to racial identity salience
		or strength
		*/
	
	Test-Hyp3: Information treatment x race will effect support for affirmative action

	Test-Hyp5: Information treatment x race will effect support for name-blind recruitment
	
	
********************************************************************************

manipulation:
	1. asked people to predict the result of a field audit experiment, 
	2. showed them the actual result of experiment (to a random subset)

outcomes:
	- what are the beliefs about racial discrimination?
	- does the demand for affirmative action depend on beliefs about 
	discrimination?

	
NOTE:
- the proposal has changed in important ways but we don't have the updated proposal
the main manipulation is now different
- we are assuming that hypothesis 2 pertains to whites vs. others because of 
proposal text (proposal page 3)

********************************************************************************

*/


use "Haaland874.dta", clear

********************************************************************************

* CONSTRUCT INDICATORS OF EXPERIMENTAL MANIPULATIONS

* did R under-estimate or over-estimate the extent of racial discrimination?

	/* 
	From quex:
	"Resumes with white-sounding names had to be sent out on average 10 times
	to get one callback for an interview.
	
	"How many times do you think resumes with black-sounding names on 
	average had to be sent out to get one callback for an interview?"
	*/
	tab Q1
	
	clonevar timesent_black=Q1
	* missing data
	replace timesent_black=. if Q1>100
	
	tab timesent_black
	
* did R under-estimate?
	/*
	From quex:
	"The researchers found that resumes with black-sounding names on average had 
	to be sent out 15 times"
	
	If the answer to Q1 is <15, then R under-estimated. 
	*/
	
	lab def underest 1 "underestimate" 0 "overestimate" .c "correct estimate"
	gen underest=1 if timesent_black<15
	replace underest=0 if timesent_black>15 & timesent_black<101
	replace underest=.c if timesent_black==15
	lab val underest underest
	tab underest, mis
	
	
* exposure to information about racial discrimination
	/* randomly assigned subset shown actual study result= treatment
	control group was provided no info about correct study finding
	*/
	
	lab def treat 0 "control" 1 "treatment"
	recode GROUP (2=0) (1=1), gen(treat)
	lab val treat treat
	tab treat
	
* R's racial identity
	lab def raceeth 1 "White, non-Hispanic" 2 "Black, non-Hispanic" ///
	3 "Other, non-Hispanic" 4 "Hispanic" 5 "2+, non-Hispanic" 6 "Asian, non-Hispanic"
	lab val RACETHNICITY raceeth
	tab RACETHNICITY

* creating a binary race variable 
	recode RACETHNICITY (1=1) (2/6=0) , gen(white)
	tab white, mis
	
* CONSTRUCT OUTCOME MEASURES
	
/* willingness to donate to NGO
	We're calling it "donate"
	
	From Quex: 
	"In Washington, D.C., several civil rights organizations work to protect 
	individuals from discrimination in society. One of these organizations, 
	the Lawyers' Committee for Civil Rights, tries to help African Americans. 
	One of the organization's key initiatives aims to reduce racial 
	discrimination in the workplace by lobbying for political reforms.

	"Below, you are given the opportunity to financially support the Lawyers' 
	Committee for Civil Rights."

Q7_Org					Q7_Me

$5 for the organization	$0 for me
$5 for the organization	$1 for me
$5 for the organization	$2 for me
$5 for the organization	$3 for me
$5 for the organization	$4 for me
$5 for the organization	$5 for me
	
	*/
	
	* note: data entered as string, changing to byte
	foreach var of varlist Q7A Q7B Q7C Q7D Q7E Q7F {
	replace `var' ="." if `var'=="98" // 98 is skipped
	}
	
	replace Q7A= "0" if Q7A == "Q7_Org" // me 
	replace Q7A= "1" if Q7A == "Q7_Org1" // ngo
	
	replace Q7B= "0" if Q7B == "Q7_Me2" // me 
	replace Q7B= "1" if Q7B == "Q7_Org2" // ngo

	replace Q7C= "0" if Q7C == "Q7_Me3" // me 
	replace Q7C= "1" if Q7C == "Q7_Org3" // ngo
	
	replace Q7D= "0" if Q7D == "Q7_Me4" // me 
	replace Q7D= "1" if Q7D == "Q7_Org4" // ngo
	
	replace Q7E= "0" if Q7E == "Q7_Me5" // me 
	replace Q7E= "1" if Q7E == "Q7_Org5" // ngo
	
	replace Q7F= "0" if Q7F == "Q7_Me6" // me 
	replace Q7F= "1" if Q7F == "Q7_Org6" // ngo
		
	
	lab def dist 0 "me" 1 "ngo"	
	foreach var of varlist Q7A Q7B Q7C Q7D Q7E Q7F {
	destring(`var'), replace
	lab val `var' dist
	}
	
	clonevar for_ngo0=Q7A 
	clonevar for_ngo1=Q7B
	clonevar for_ngo2=Q7C
	clonevar for_ngo3=Q7D
	clonevar for_ngo4=Q7E
	clonevar for_ngo5=Q7F
	
	*sum to create total amount for NGO
	gen donation= for_ngo0+for_ngo1+for_ngo2+for_ngo3+for_ngo4+for_ngo5
	tab donation

* support for affirmative action
	// in the quex, affirmative action has 2 items: 4 and 5
	

	* affirmative action
		clonevar support1=Q3
	
	* program assistance for blacks in getting jobs
		clonevar support2=Q4
	
	* support for name-blind recruitment
		clonevar support_nameblind=Q6
		
		/* the variables are reverse-coded, need to correct so that higher values 
		reflect greater support
		*/
		lab def support 5 "Strongly support" 4 "Support" ///
		3 "Neither support nor oppose" 2 "Oppose" 1 "Strongly oppose"


		* missing data
		foreach var of varlist support* {
		replace `var' = . if `var'==98
		recode `var' (1=5) (2=4) (3=3) (4=2) (5=1)
		lab val `var' support
		tab `var', mis
		}

		* create summated scale
		gen support_affact = support1 + support2

	
********************************************************************************

* TEST HYPOTHESIS 


*Test-Hyp1: Information will increase support for affirmative action among those who under-estimated
	reg support_affact i.treat if underest==1
		// reject. 0.664
	tess 1.treat +, init(Haaland874) bonf(2)
		
*Test-Hyp2: Information will decrease support for affirmative action among those who over-estimated
	reg support_affact i.treat if underest==0
		// reject. 0.658
	tess 1.treat -, bonf(2)
	
*Test-Hyp3: Information will increase willingness to donate to NGO among those who under-estimated
			
	/* We need to re-shape the file. 
	Each respondent answered 5 questions about how much they will give to R vs.
	keep for themselves.
	*/

	reg donation i.treat if underest==1
		// do not reject. 0.012
	tess 1.treat +, bonf(2)
	
*Test-Hyp4: Information will decrease willingness to donate to NGO among those who over-estimated
	reg donation i.treat if underest==0
		// reject. 0.999	
	tess 1.treat -, bonf(2)
	
*Test-Hyp5: Information treatment x race will have a significant effect on support for affirmative action
	reg support_affact i.white##i.treat
		// reject. 0.827
	tess 1.treat#1.white, bonf(2)
	
*Test-Hyp6: Information treatment x race will effect support for name-blind recruitment
	reg support_nameblind i.white##i.treat 
		// do not reject. 0.009
	tess 1.treat#1.white, bonf(2)	

		

	
		

